
#include "StdAfx.h"
#include "LinkButton.h"
#include "LinkInputNode.h"

CLinkButton::CLinkButton() : CLinkCtrl(NULL)
{
	CLinkInputNode::AddInput(this, CtrlType);
}

CLinkButton::~CLinkButton()
{
	CLinkInputNode::DelInput(this);
}

CString	CLinkButton::GetControlData(BOOL bTrimBlank, BOOL bReplaceSingleQuotation)
{
	CString strValue;
	GetWindowText(strValue);

	if(bTrimBlank)
	{
		strValue.TrimLeft();
		strValue.TrimRight();
	}
	
	if(bReplaceSingleQuotation)
		strValue.Replace(_T("'"), _T("''"));

	return strValue;
}
